import {errorMessage} from "../resTip/resTip"
import { NextFunction, Request, Response } from 'express'

function loginCheck(req:Request,res:Response,next:NextFunction):void{
  let session:any = req.session     
  if(session.username){
    next()
    return
  }
    res.json(new errorMessage("请登录"))
}
export default loginCheck